<?php

include('resources/classes/db.php');

$user = new User();
$user->username = $_POST['username'];
$user->password = $_POST['password'];

if($user->username == '' || $user->password == ''){
     echo "<div class='corner-all error padding-all margin-top font12'>Please enter your username and password.</div>";
}
else{
    if($user->login() == true){
        echo "<div class='corner-all success padding-all margin-top font12'>Successfully log in.</div>";
    }
    else{
        echo "<div class='corner-all error padding-all margin-top font12'>Please enter a valid username and password.</div>";
    }
}




?>
